# $NetBSD$

SQUEAK_VERSION=	5.3
IMAGE_VERSION=	19486
IMAGE_ARCH=	64bit
SQUEAK_SOURCES=	SqueakV50.sources

DISTNAME=	Squeak${SQUEAK_VERSION}-${IMAGE_VERSION}-${IMAGE_ARCH}
PKGNAME=	squeak5-${SQUEAK_VERSION}.${IMAGE_VERSION}
CATEGORIES=	lang
MASTER_SITES=	http://files.squeak.org/${SQUEAK_VERSION}/${DISTNAME}/
EXTRACT_SUFX=	.zip
DISTFILES=	${DEFAULT_DISTFILES} ${SQUEAK_SOURCES}.gz

SITES.${SQUEAK_SOURCES}.gz=	http://files.squeak.org/sources_files/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://squeak.org/
COMMENT=	Full Smalltalk 80 with portability to UN*X, Mac, and Windows
LICENSE=	mit AND apache-2.0

DEPENDS=	squeak5-vm-[0-9]*:../../wip/squeak5-vm

WRKSRC=		${WRKDIR}
USE_LANGUAGES=	# none

NO_CONFIGURE=	yes
NO_BUILD=	yes

PRINT_PLIST_AWK+=	{gsub(/${SQUEAK_VERSION}/, "$${SQUEAK_VERSION}");}
PRINT_PLIST_AWK+=	{gsub(/${IMAGE_VERSION}/, "$${IMAGE_VERSION}");}
PRINT_PLIST_AWK+=	{gsub(/${IMAGE_ARCH}/, "$${IMAGE_ARCH}");}

PLIST_SUBST+=	SQUEAK_VERSION=${SQUEAK_VERSION}
PLIST_SUBST+=	IMAGE_VERSION=${IMAGE_VERSION}
PLIST_SUBST+=	IMAGE_ARCH=${IMAGE_ARCH}

INSTALLATION_DIRS=	${SQUEAK_DST}

SQUEAK_DST=	share/squeak/${SQUEAK_VERSION}

do-install:
	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}.image ${DESTDIR}${PREFIX}/${SQUEAK_DST}
	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}.changes ${DESTDIR}${PREFIX}/${SQUEAK_DST}
	${INSTALL_DATA} ${WRKDIR}/${SQUEAK_SOURCES} ${DESTDIR}${PREFIX}/${SQUEAK_DST}

.include "../../mk/bsd.pkg.mk"
